package win.smartown.java.io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * Created by smartown on 2017/5/16.
 */
public class FileWriter {

    public void writeFile() throws IOException {
        OutputStream fos = new FileOutputStream("E:/test.txt");
        byte[] bytes = "哈哈，我试试能不能把这段文字写到文件里面".getBytes("utf-8");
        fos.write(bytes);
        fos.close();
    }

}
